package com.young.canal.serializer;

/**
 * @description：
 * @author: yangyahui01
 * @date: 12/11/24 7:05 PM
 */
public enum EventSourceType {

    ORACLE(1, "ORACLE"),
    MYSQL(2, "MYSQL"),
    PGSQL(3, "PGSQL");

    public int type;
    public String meaning;

    EventSourceType(int type, String meaning) {
        this.type = type;
        this.meaning = meaning;
    }

    public static EventSourceType typeOf(Integer type) {
        if (type == null) {
            return null;
        }
        for (EventSourceType e : values()) {
            if (e.type == type) {
                return e;
            }
        }
        return null;
    }
}

